package com.teatrace.model.produce;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.teatrace.model.base.Field;
import com.teatrace.model.base.TeaTreeType;

/**
 * 
 * @author Administrator
 *	茶林实体类
 */
@Entity
@Table(name="teaTrees")
public class TeaTrees {

	@Id
	@Column(name="teatrees_id")
	private int id;//teatrees_id
	
	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="teatree_type")
	private TeaTreeType teaTreeType;//teatree_type
	
	@Column(name="plant_time",columnDefinition="date")
	private String plantTime;
	

	private int count;//茶树数量
	
	@ManyToOne(cascade = {CascadeType.ALL})
	@JoinColumn(name="field")
	private Field field;
	
	private String status;//茶树生长状态
	
	@Column(columnDefinition="int")
	private boolean pickable;//是否可采摘
	
	@ManyToOne(cascade = {CascadeType.ALL},optional=true)
	@JoinColumn(name="teatree_plant_id")//teaTrees是关系维护端
	private TeaTreePlant teaTreePlant;
	
	

	public TeaTreeType getTeaTreeType() {
		return teaTreeType;
	}

	public void setTeaTreeType(TeaTreeType teaTreeType) {
		this.teaTreeType = teaTreeType;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public Field getField() {
		return field;
	}

	public void setField(Field field) {
		this.field = field;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public boolean isPickable() {
		return pickable;
	}

	public void setPickable(boolean pickable) {
		this.pickable = pickable;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public void setTeaTreePlant(TeaTreePlant teaTreePlant) {
		this.teaTreePlant = teaTreePlant;
	}

	public TeaTreePlant getTeaTreePlant() {
		return teaTreePlant;
	}

	public void setPlantTime(String plantTime) {
		this.plantTime = plantTime;
	}

	public String getPlantTime() {
		return plantTime;
	}

}
